package cn.risebd.wechat.serializer;

import java.io.IOException;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import cn.risebd.wechat.model.data.article.ArticleShareScene;

/**
 * @author 喝咖啡的蚂蚁  Date: 20/11/15
 */
public class ArticleShareSceneDeserializer extends JsonDeserializer<ArticleShareScene> {

	@Override
	public ArticleShareScene deserialize(JsonParser parser, DeserializationContext ctxt)
			throws IOException, JsonProcessingException {
		return ArticleShareScene.from(parser.getIntValue());
	}
}
